package me.wangcai.trafficpoliceai.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import me.wangcai.trafficpoliceai.enums.PermissionEnum;
import me.wangcai.trafficpoliceai.model.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    User login(String username,String md5Password);
    List<User> getUserList(int start, int amount);
    boolean editUser(int id, String password, String number, String mail, PermissionEnum permission);
    User getUserByName(String username);
    User getUserById(int id);
    boolean register(User user);
}
